﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="reg.aspx.cs" Inherits="reg" MasterPageFile="~/Login.master" %>
<asp:Content ContentPlaceHolderID="l_style" runat="server">
    <link href="Styles/reg.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">

        $(document).ready(function () {
            //验证用户名
            $("#holder_email").blur(function () {
                if ($("#holder_email").val() == "") {
                    $("#holder_email").val("用户名不能为空");
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "Server.aspx?username=" + $("input[id=holder_email]").val(),
                        success: function (data) {
                            $("#holder_email").val(data);
                        }
                    });
                }
            });
            //验证昵称
            $("#holder_nickname").blur(function () {
                if ($("#holder_nickname").val() == "") {
                    $("#holder_nickname").val("昵称不能为空");
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "Server.aspx?nickname=" + $("input[id=holder_nickname]").val(),
                        success: function (data) {
                            $("#holder_nickname").val(data);
                        }
                    });
                }
            });

            $(":input").click(function () {
                $(this).val("");
            });
        });
    </script> 
</asp:Content>
<asp:Content ContentPlaceHolderID="holder" runat="server">
    
    <div class="apply">
    <div class="regbox"><a href="login.aspx" class="registbutton" style="">老用户</a></div>
    <div class="desc">10 秒完成新用户注册</div>
    <div class="tip"></div>
	<form onsubmit="return submitCheck2(this);" method="post" runat="server">
		<div class="regrow">邮箱：<input type="text" name="email" class="itext" id="email" runat="server"/><label id="checkResult"></label></div>
		<div class="regrow">密码：<input type="password" name="password" id="password" class="itext" runat="server"/></div>
		<div class="regrow">密码确认：<input type="password" name="password2" id="password2" class="itext" runat="server"/></div>
		<div class="regrow">昵称：<input type="text" name="username" class="itext" id="nickname" runat="server"/></div>
		<div class="regrow2"><asp:Button ID="Submit1" class="ibutton"  runat="server" 
                Text="我要注册" onclick="Submit1_Click" /></div>
	</form>
</div>
</asp:Content>
